package com.ajavaer.framework.office.files;


import com.ajavaer.framework.office.Excel;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.OutputStream;

/**
 * Created by liyongyao on 2017/1/5.
 */

public interface ExcelFile<T> {

    default void save(File file) throws FileNotFoundException, IllegalAccessException {
        save(new FileOutputStream(file));
    }

    default void save(OutputStream out) throws IllegalAccessException {
        Excel.saveExcel(this, out);
    }

}
